package org.example.config;

import com.aliyun.oss.OSSClient;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@Data
public class OSSConfig {

    private String endpoint = "http://oss-cn-qingdao.aliyuncs.com";
    private String accessKeyId = "LTAI5tRhzvfyS2nZR9bZhdf6";
    private String accessKeySecret = "7djPhexkJdj2UGNswI21tyz8dUYs1b";

    @Bean
    public OSSClient ossClient() {
        return new OSSClient(endpoint, accessKeyId, accessKeySecret);
    }
}